package app;

import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.*;

import cqueue.*;

public class CircleWindow extends JFrame 
				implements EventListener, 
						   WindowListener, 
						   EventGenerator,
						   MouseListener
{

	private ListenerEventQueue equeue;
	
	
    /**
     * Construct a new CloseableFrame
     */
    public CircleWindow(ListenerEventQueue equeue, JTextArea textArea)
    {
        super();
        
        // first do some look and feel stuff, then resume normal code style...
        String      lookAndFeel;
        
        try 
        {
           lookAndFeel = UIManager.getSystemLookAndFeelClassName();
           UIManager.setLookAndFeel(lookAndFeel);
        }
        catch (Exception e)
        {
        	// shouldn't produce an error
        }
        
        // resuming usual code style...
        
    }



    /**
     * Handle windowClosing events (required by WindowListener)
     */
    public void windowClosing(WindowEvent e)
    {
    }
    
    public void handleEvent(ListenerEvent event)
    {

    }
    
    public void mouseClicked(MouseEvent e)
    {
    	//System.out.println("whee!"); //debug
    	equeue.postEvent(new ListenerEvent(null, "MouseClicked", "blah"));
    }
    
    /**
     * handle other mouse events (required by MouseListener)
     */
    public void mouseEntered(MouseEvent e){}
    public void mouseExited(MouseEvent e){}
    public void mousePressed(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}

    /**
     * Handle other windowing events (required by WindowListener)
     */
    public void windowOpened(WindowEvent e){}
    public void windowClosed(WindowEvent e){}
    public void windowIconified(WindowEvent e){}
    public void windowDeiconified(WindowEvent e){}
    public void windowActivated(WindowEvent e){}
    public void windowDeactivated(WindowEvent e){}
}
